package cn.nexd.location.collector.core.collectors;


import android.content.Context;

import cn.nexd.location.collector.NexdCollectorConfig;
import cn.nexd.location.collector.core.BluetoothCollector;
import cn.nexd.location.collector.core.Collector;
import cn.nexd.location.collector.core.WifiCollector;

/**
 * 产生采集任务的工厂。通过它向调度器提供采集任务，并由调度器分发采集任务。
 * Created by codingfish on 15/9/28.
 */
public class CollectorFactory {

    public CollectorFactory() {
    }


    /**
     * 产生 Wifi 采集器
     *
     * @param context
     * @param collectorConfig
     * @param wifiCollectorListener
     * @return WifiCollector
     */
    public static WifiCollector getWifiCollector(Context context, NexdCollectorConfig collectorConfig, Collector.WifiCollectorListener wifiCollectorListener) {
        return new WifiCollectorTask(context, collectorConfig, wifiCollectorListener);
    }

    public static BluetoothCollector getBluetoothCollector(Context context, NexdCollectorConfig collectorConfig, Collector.BluetoothCollectorListener bluetoothCollectorListener) {
        return new BluetoothCollectorTask(context, collectorConfig, bluetoothCollectorListener);
    }
}
